<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in getSwiper" :key="item.id">
          <img :src="item.picUrl" alt="">
      </van-swipe-item>
      <!-- <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item> -->
    </van-swipe>
  </div>
</template>

<script>
export default {
  data() {
    return {
        getSwiper:[]
    };
  },
  mounted(){
      this.$API.getSwiper().then(res=>{
          console.log(res);
          this.getSwiper = res.data.data
      })
  }
};
</script>

<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  /* line-height: 150px; */
  text-align: center;
  /* background-color: #39a9ed; */
}
.my-swipe .van-swipe-item img {
    width: 100%;
    height: 200px;
}
</style>